﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using WorldOfSuperpowers_COMMON.DataModel;

public class UserInfoManager : MonoBehaviour
{
    public static UserInfoManager _instance;
    public Text UserName;
    public Text UserLevel;
    public Image UserIcon;

    void Awake()
    {
        _instance = this;
    }

    public void SetUserInfo(UserDataModel model)
    {
        UserName.text = model.UserName;
        UserLevel.text = model.UserLevel+"";
        UserIcon.sprite = IconSpriteManager._instance.GetHeadIconFromIndex(model.IconIndex);
    }
}
